
package com.hlkj.pay.service.order;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import java.util.List;

import com.hlkj.framework.common.pojo.PageResult;
import com.hlkj.pay.dto.order.OrderFundDto;
import com.hlkj.pay.dto.order.PayOrderFundDto;
import com.hlkj.pay.dto.order.PayOrderFundQueryDto;
import com.hlkj.pay.dto.order.RefundOrderFundDto;
import com.hlkj.pay.enums.PayOrderEnums;
import com.hlkj.pay.infrastructure.model.order.OrderFundDO;
import com.hlkj.pay.infrastructure.model.order.OrderFundDetailDO;
import com.hlkj.pay.infrastructure.model.order.PayOrderDO;
import com.hlkj.pay.vo.order.req.AcctPayOrderParamReq;
import com.hlkj.pay.vo.order.req.AcctRefundOrderParamReq;
import com.hlkj.pay.vo.order.req.OrderAccount;

/**
 * @author HlpayTeam
 * @date 2024/10/10 15:18
 */
public interface IPayOrderFundService {

    /**
     *
     * @param payOrderDO
     * @param payOrderFundDtos
     */
    OrderFundDto addAcctPayInfo(AcctPayOrderParamReq acctPayOrderParamReq, List<PayOrderFundDto> payOrderFundDtos, PayOrderDO payOrderDO);

    /**
     *
     * @param payOrderDO
     * @param acctInfos
     */
    OrderFundDto addAcctRefundInfo(AcctRefundOrderParamReq acctPayOrderParamReq, List<RefundOrderFundDto> payOrderFundDtos, PayOrderDO payOrderDO,PayOrderEnums.PAY_ORDER_FUND_STATUS payOrderFundStatus);

    /**
     *
     * @param payOrderNo
     */
    List<OrderFundDetailDO> queryPayAcctInfo(String payOrderNo);

    /**
     *
     * @param batchNo
     * @param mchAcctOrderNo
     */
    OrderFundDO queryPayAcctInfo(String batchNo, String mchAcctOrderNo);

    /**
     *
     * @param batchNo
     * @param mchAcctOrderNo
     */
    OrderFundDO queryRefundAcctInfo(String batchNo, String mchAcctRefundOrderNo);

    /**
     *
     * @param orderDb
     * @param orderFunds
     */
    void updateAcctInfoCallBack(PayOrderDO orderDb, List<OrderFundDetailDO> orderFunds);

    /**
     *
     * @param orderFunds
     */
    OrderFundDto updatePayFund(List<OrderFundDetailDO> orderFunds, String batchNo);

    /**
     *
     * @param batchNo
     * @param mchAcctOrderNo
     */
    OrderFundDto queryAcctOrderFundDto(String batchNo);
    /**
     *
     * @param batchNo
     * @param mchAcctOrderNo
     */
    OrderFundDto queryAcctOrderFundDtoByPayOrderNo(String batchNo);

    List<OrderFundDetailDO> queryAcctDetailInfo(String batchNo);

    List<OrderAccount> queryAcctAccountDetailInfo(String batchNo, Integer status,String failReason);

    /**
     *
     * @param payOrderFundQueryDto
     * @return
     */
    List<OrderFundDO> queryPayAcctInfoList(PayOrderFundQueryDto payOrderFundQueryDto);

    /**
     *
     * @param id
     * @param payOrderFundStatus
     */
    void updatePayFundStatus(Long id, PayOrderEnums.PAY_ORDER_FUND_STATUS payOrderFundStatus);

    void updatePayFundStatus(OrderFundDO orderFundDO);

    void updatePayFundDetails(List<OrderFundDetailDO> orderFunds);

    /**
     * 
     * @param orderFundQueryDto
     * @return
     */
    PageResult<OrderFundDO> queryPage(PayOrderFundQueryDto orderFundQueryDto);

    void delAcctDetail(String batchNoDetail);

    OrderFundDetailDO queryAcctDetail(String batchNoDetail);
}
